import org.annoflow.policy.Policy;
import org.annoflow.policy.boundry.SecureClassPolicy;
import org.annoflow.filter.*;
import org.annoflow.filter.boundry.*;
import org.annoflow.filter.xss.*;

@Policy(policy=SecureClassPolicy.class)
public class User {
	private String name;
	private String imageURL;
	private int age;
	private String schoolLink;
	private String schoolName;
	private String password;

	public User(String password) {
		init();
		this.password = password;
	}

	public User() {
		init();
	}

	private void init() {
		name = "Mike";
		imageURL = "HokieBird.jpg";
		age = 10;
		schoolLink = "http://vt.edu";
		schoolName = "Virginia Tech";
		password = "foobar";
	}

	public String getName() {
		return name;
	}

	public String getImage() {
		return imageURL;
	}

	public int getAge() {
		return age;
	}
	
	public String getSchoolLink() {
		return "<a href=\"" + schoolLink + "\" style=\"font-size: 10pt\">"
				+ getSchoolName() + "</a>";
	}
	@Filter(type=SanitizeHTMLFilter.class)
	public String getSchoolName() {
		return schoolName;
	}

	public String getSchoolAddress() {
		return schoolLink;
	}

	public void setSchoolName(String schoolName) {
		this.schoolName = schoolName;
	}

	public void setSchoolAddress(String schoolAddress) {
		this.schoolLink = schoolAddress;
	}
	@Filter(type=SecureMethodFilter.class)
	public String getPassword() {
		return password;
	}
	@Filter(type=SecureMethodFilter.class)
	public String toString() {
		return name + ":" + password;
	}
}
